<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>open 和 close</title>
    <script>
        function abc(){
            // window.alert("将要跳转")
            let flag = window.confirm("确定要打开新页面吗?");
            if(flag) {
                window.open("demo1.html", "", "width=400,height=400,left=500");
            }
        }
    </script>
</head>
<body>
    <h1>我是index页面</h1>
    <a href="demo1.html" target="_blank">demo1</a>
    <button onclick="abc()">demo1</button>
</body>
</html>